/*
 * create:2016年4月13日 下午4:55:22
 * author:wangds  
 */
package com.cxkj.shop.proc;

import java.util.Collections;
import java.util.List;

import net.wangds.utilities.lang.CloseableUtils;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import com.cxkj.shop.model.user.DefaultPostAddress;

/**
 * .
 * 
 * @author wangds
 *
 */
public class QueryAddressByOpenIdProc extends
		LoadByOpenIdProc<List<DefaultPostAddress>> {

	@Override
	protected List<DefaultPostAddress> loadByOpenId(String openId) {
		List<DefaultPostAddress> list = Collections.emptyList();

//		Map<String, Object> map = new HashMap<String, Object>();

		SqlSessionFactory fac = this.getSessionFac();
		SqlSession ssn = null;
		try {
			ssn = fac.openSession();
			list = ssn.selectList(this.getSqlId(), openId);
		} finally {
			CloseableUtils.close(ssn);
		}

		return list;
	}
	

}
